package com.monkey.controller;

import com.monkey.service.SysUserService;
import com.monkey.vo.Results;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author：monkey-L
 * @description: .
 * @date: 17:12 2021/10/5
 */
@RestController
@RequestMapping("users")
public class UsersController {

    @Autowired
    private SysUserService sysUserService;

    @PostMapping("currentUser")
    public Results currentUser(@RequestHeader("Authorization") String token) {
        return sysUserService.findUserByToken(token);
    }
}
